package com.kt.mes.listener;

import com.kt.mes.opc.OpcInteface;
import com.kt.mes.util.OpcUtil;
import com.ruoyi.common.utils.spring.SpringUtils;
import org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaSubscription;
import org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaSubscriptionManager;
import org.eclipse.milo.opcua.stack.core.UaException;
import org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode;

public class Gw06SubscriptionListener implements UaSubscriptionManager.SubscriptionListener{

    public void onSubscriptionTransferFailed(UaSubscription subscription, StatusCode statusCode) {
        System.out.println("工位6 重新开始订阅");
        OpcUtil.mapOpcClient.put("gw06-state","reset");
        OpcInteface opcInteface=(OpcInteface)SpringUtils.getBean("OpcInteface");
        opcInteface.subscriptionOfGw("gw06");


    }



}
